home *** CD-ROM | disk | FTP | other *** search
/ CDUTIL 13 / CDUTIL #13 Julio 1995.iso / windows / amipro3 / macros.cmz / FIT2SCRN.SMM < prev    next >
Encoding:
INI File  |  1992-11-18  |  4.1 KB  |  312 lines

  1. [ver]
  2.     4
  3. [sty]
  4.     _macro.sty
  5. [files]
  6. [charset]
  7.     82
  8.     ANSI (Windows, IBM CP 1252)
  9. [revisions]
  10.     0
  11. [prn]
  12.     Apple LaserWriter Plus
  13. [port]
  14.     LPT1:
  15. [lang]
  16.     1
  17. [desc]
  18.     Ajusta la vista del documento a la pantalla.
  19.     Lotus WPD
  20.     Advanced
  21.     API Calls
  22.     autorun
  23.     714877372
  24.     12
  25.     704844403
  26.     182
  27.     1
  28.     0
  29.     0
  30.     0
  31.     0
  32.     
  33.     
  34.     
  35.     
  36.     
  37.     
  38.     1
  39. [fopts]
  40.     0
  41.     1
  42.     0
  43.     0
  44. [lnopts]
  45.     2
  46.     Body Text
  47.     1
  48. [docopts]
  49.     5
  50.     2
  51. [GramStyle]
  52.     
  53. [ParaNum]
  54.     1
  55. [tag]
  56.     Est<\a>ndar
  57.     5
  58.     [fnt]
  59.         Tms Rmn
  60.         240
  61.         0
  62.         49152
  63.     [algn]
  64.         1
  65.         1
  66.         0
  67.         0
  68.         0
  69.     [spc]
  70.         17
  71.         0
  72.         1
  73.         0
  74.         0
  75.         1
  76.         100
  77.     [brk]
  78.         4
  79.     [line]
  80.         8
  81.         0
  82.         1
  83.         0
  84.         1
  85.         1
  86.         1
  87.         10
  88.         10
  89.         1
  90.     [spec]
  91.         0
  92.         0
  93.         
  94.         0
  95.         1
  96.         1
  97.         0
  98.         0
  99.         0
  100.         0
  101.     [nfmt]
  102.         24
  103.         1
  104.         2
  105.         ,
  106.         .
  107.         Pts
  108.     Est<\a>ndar
  109.     0
  110.     0
  111. [l1]
  112.     0
  113. [pg]
  114.     1
  115.     47 0 13 1025 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  116. [edoc]
  117. <:#293,9025>Macro by <+!>Charlie Pappas, Peyton McManus and David Zoller<-!>
  118.  
  119. <:#279,9025>
  120.  
  121. <:#279,9025>define GetClientRect(hWnd, lpRect) dllcall("user,GetClientRect,HHN", %1, %2)
  122.  
  123. <:#279,9025>define Getfocus() DllCall("user,GetFocus,H")
  124.  
  125. <:#279,9025>define IsOKToRun(menuname)    GetInfo(217, 24, %1);
  126.  
  127. <:#279,9025>
  128.  
  129. <:#279,9025>Declare GetLayout()
  130.  
  131. <:#279,9025>
  132.  
  133. @Function@<:#293,9025>Function BestView()
  134.  
  135. <:#279,9025>result=IsOKToRun(CustomView)
  136.  
  137. <:#279,9025>if result != 1
  138.  
  139. <:#279,9025>    exit function
  140.  
  141. <:#279,9025>endif
  142.  
  143. <:#279,9025>ignorekeyboard(2)
  144.  
  145. <:#279,9025>CheckMenuItem(1, "Vis&ta", "A&justar a la pantalla", 1)
  146.  
  147. <:#279,9025>if not CheckMenuItem(1, "Vis&ta", "A&justar a la pantalla", 1)
  148.  
  149. <:#837,9025>    insertmenuitem(1, "Vis&ta", 1, "A&justar a la pantalla", getrunningmacrofile$(), "Establece el nivel de vista de forma que se pueda ver desde el margen izquierdo al derecho de un documento.")
  150.  
  151. <:#279,9025>    return 1
  152.  
  153. <:#279,9025>endif
  154.  
  155. <:#279,9025>CheckMenuItem(1, "Vis&ta", "A&justar a la pantalla", 0)
  156.  
  157. <:#279,9025>dim rect(4)
  158.  
  159. <:#279,9025>Size = GetLayout()
  160.  
  161. <:#279,9025>getclientrect(getfocus(), &rect)
  162.  
  163. <:#279,9025>newview = round(((rect(3) / 623) * (9144 / size) * 100))
  164.  
  165. <:#279,9025>
  166.  
  167. <:#279,9025>If NewView <;> 10 and NewView << 401
  168.  
  169. <:#279,9025>    disp=GetProfileString$("AmiPro","Display","AMIPRO.INI")
  170.  
  171. <:#279,9025>    if disp = ""
  172.  
  173. <:#279,9025>        disp = 19590
  174.  
  175. <:#279,9025>    endif
  176.  
  177. <:#279,9025>    ViewPreferences(Disp,NewView)
  178.  
  179. <:#279,9025>Endif
  180.  
  181. <:#279,9025>customview()
  182.  
  183. <:#279,9025>End Function
  184.  
  185. <:#279,9025>
  186.  
  187. <:#279,9025>
  188.  
  189. @Function@<:#293,9025>FUNCTION GetLayout()
  190.  
  191. <:#279,9025>ignorekeyboard(2)
  192.  
  193. <:#279,9025>DefStr pm, WidthTwips, cp, dz;
  194.  
  195. <:#279,9025>Cnt = GetLayoutParmCnt(ModLayoutRightPage) ' Get number of parameters 
  196.  
  197. <:#279,9025>DIM Stuff(Cnt)'Dimension an array for that amount
  198.  
  199. <:#279,9025>GetLayoutParameters(ModLayoutRightPage, &Stuff) ' Get the parameters and 
  200.  
  201. <:#279,9025>GetLayoutPageSize(&pm, &WidthTwips, &cp, &dz)
  202.  
  203. <:#279,9025>LeftMargin=Stuff(1)
  204.  
  205. <:#279,9025>RightMargin=Stuff(3)
  206.  
  207. <:#279,9025>getlayout = WidthTwips-LeftMargin-RightMargin
  208.  
  209. <:#279,9025>END FUNCTION 
  210.  
  211. >
  212.  
  213. [Embedded]
  214. 00003111
  215. >
  216. [macsum] 2
  217. BestView 0 0 6 8
  218. GetLayout 800 0 9 36
  219. [macse]
  220. 14 BestView
  221. 0 1313 217 24 202
  222. 13
  223. 8 1
  224. 6 1
  225. 5 1
  226. 18 1
  227. 11 00000082
  228. 6 0
  229. 15
  230. 9
  231. 0 32 2
  232. 0 518 1 "Vis&ta" "A&justar a la pantalla" 1
  233. 0 518 1 "Vis&ta" "A&justar a la pantalla" 1
  234. 13
  235. 1 3
  236. 11 00000384
  237. 0 802
  238. 13
  239. 0 527 1 "Vis&ta" 1 "A&justar a la pantalla" [X] "Establece el nivel de vista de forma que se pueda ver desde el margen izquierdo al derecho de un documento."
  240. 5 1
  241. 15
  242. 9
  243. 0 518 1 "Vis&ta" "A&justar a la pantalla" 0
  244. 5 4
  245. 21 2 [X]
  246. 16 GetLayout
  247. 13
  248. 8 3
  249. 0 284 "user,GetFocus,H"
  250. 13
  251. 0 284 "user,GetClientRect,HHN" [X] &2
  252. 5 3
  253. 22 2
  254. 5 623
  255. 4 1
  256. 5 9144
  257. 6 3
  258. 4 1
  259. 4 0
  260. 5 100
  261. 4 0
  262. 0 786 [X]
  263. 13
  264. 8 4
  265. 6 4
  266. 5 10
  267. 18 3
  268. 6 4
  269. 5 401
  270. 18 5
  271. 1 1
  272. 11 00000779
  273. 0 286 "AmiPro" "Display" "AMIPRO.INI"
  274. 13
  275. 8 5
  276. 6 5
  277. 7 ""
  278. 18 0
  279. 11 00000758
  280. 5 19590
  281. 8 5
  282. 2 206 1 "{5}" "{4}"
  283. 2 202 1
  284. 6 0
  285. 15
  286. 9
  287. 14 GetLayout
  288. 0 32 2
  289. 0 1285 363
  290. 13
  291. 8 5
  292. 6 5
  293. 21 6 [X]
  294. 0 1286 363 &6
  295. 0 1282 &1 &2 &3 &4
  296. 5 1
  297. 22 6
  298. 8 7
  299. 5 3
  300. 22 6
  301. 8 8
  302. 6 2
  303. 6 7
  304. 3 1
  305. 6 8
  306. 3 1
  307. 8 0
  308. 6 0
  309. 15
  310. 9
  311. 00003136
  312.